{include file="public/head"/}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">配置参数</div>
                <div class="layui-card-body" pad15>
                    <div class="layui-form" wid100 lay-filter="form">

                        <div class="layui-form-item">
                            <label class="layui-form-label">AccessKeyID</label>
                            <div class="layui-input-inline">
                                <input type="text" name="AccessKeyID" lay-verify="required" value="{$info.AccessKeyID|default=''}" placeholder="请输入AccessKeyID" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">阿里云AccessKeyID</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">AccessKeySecret</label>
                            <div class="layui-col-md3">
                                <input type="text" name="AccessKeySecret" value="{$info.AccessKeySecret|default=''}" placeholder="请输入AccessKeySecret" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">&nbsp;&nbsp;阿里云AccessKeySecret</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">Bucket</label>
                            <div class="layui-col-md2">
                                <input type="text" name="Bucket"  lay-verify="Bucket" value="{$info.Bucket|default=''}" placeholder="请输入Bucket" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">
                                &nbsp;&nbsp;阿里云Bucket
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">Endpoint</label>
                            <div class="layui-col-md3">
                                <input type="text" name="Endpoint"  value="{$info.Endpoint|default=''}" placeholder="请输入Endpoint" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">
                                &nbsp;&nbsp;阿里云Endpoint
                            </div>
                        </div>
                        
                        <div class="layui-form-item">
                            <label class="layui-form-label">自定义域名</label>
                            <div class="layui-col-md3">
                                <input type="text" name="DOMAIN"  value="{$info.DOMAIN|default=''}" placeholder="请输入DOMAIN" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">
                                &nbsp;&nbsp;自定义阿里云OSS访问域名,HTTP
                            </div>
                        </div>    
                        <div class="layui-form-item">
                            <div class="layui-inline">
                                <label class="layui-form-label">本地服务器存储</label>
                                <div class="layui-input-inline">
                                    <input type="radio" name="local_file_save" {if(isset($info.local_file_save)&&($info.local_file_save eq 1))}checked{/if} value="1" title="是">
                                    <input type="radio" name="local_file_save" {if(empty($info.local_file_save)||$info.local_file_save eq 0)}checked{/if} value="0" title="否">
                                </div>
                            </div>                                            
                         </div>

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <input type="hidden" value="{$id|default=''}" name="id">
                                <button class="layui-btn" lay-submit lay-filter="edit-but">确认保存</button>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/foot"/}
<script>
    layui.config({
        base: '__LAYDMIN__/',{if config('app.app_debug')}version: true{/if}
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','form'],function(){
		var $ = layui.$, admin = layui.admin, table = layui.table, element = layui.element, form = layui.form,util = layui.util, upload = layui.upload;
			var uri="{:url(SYS_PATH.'/'.CONTROLLER.'/edit')}";
			form.val("form", {$info|raw})
			form.on('submit(edit-but)', function (data) {
				admin.req({
					url: uri, 
					type: 'post',
					data: data.field, 
					done: function (res) {
						window.top.layer.msg(res.msg, {icon: 1, time: 1000,shade:[0.5,'#000']}, function () {
							layer.closeAll("iframe");
							//刷新父页面
							parent.location.reload();
						});
					}
				});
			});			
				
	});
</script>
</body>
</html>